<template>
	<view>
		<stop isBack>
			<view slot="content">故障维修确认</view>
		</stop>
		<view class="lh2 bcf pad2 mart3">
			<stextarea label="服务评价" placeholder="[ 可选 ]" v-model="en.comment"></stextarea>
		</view>
		<view class="lh2 bcf pad2 bdtso">
			<view class="tac pad2 line-green round cu-btn lg w100 mart5" @tap="submit">
				<view>提交</view>
				<ripple></ripple>
			</view>
		</view>
		<!-- <loading :loading="myIsLoading"></loading> -->
	</view>
</template>

<script>
	export default {
		components:{},
		data() {
			return {
				id:"",
				en:{
					id:'',
					comment:''
				}
			}
		},
		methods: {
			submit(){
				this.log(this.en)
				//检查数据
				if(this.isnull(this.en.comment)){
					this.en.comment = '用户未填写'
				}
				this.$api.patch("/api/machineBreaks/confirm/" + this.id,this.en,(res)=>{
					this.log(res)
					if(res.s == 1){
						this.goback()
					}
				})
			}
		},
		onLoad(option) {
			this.clearLoading()
			this.id = option.id
			this.en.id = option.id
		}
	}
</script>

<style>

</style>
